package HardwareConfiguration;

import java.io.File;
import java.io.IOException;

import javax.swing.JFileChooser;
import javax.swing.filechooser.FileNameExtensionFilter;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.wb.swt.SWTResourceManager;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import com.map.MapFrame;
import com.map.OpenFile;

import PictureWork.PictureDeal;
import PictureWork.TurnFramePic;

public class HardwareConfiguration_2_B2 extends Composite {
	//硬件配置-导入软件配置-----图形界面配置-2
	private File selectedFile;

	/**
	 * Create the composite.
	 * @param parent
	 * @param style
	 */
	public HardwareConfiguration_2_B2(Composite parent, int style) {
		super(parent, style);
		this.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		setSize(1000, 800);
		Label lblNewLabel = new Label(this, SWT.NONE);
		lblNewLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		lblNewLabel.setBounds(47, 23, 182, 27);
		lblNewLabel.setText("导入配置");
		lblNewLabel.setFont(new Font(getDisplay(), "宋体",15,SWT.RIGHT));
		
		Label label = new Label(this, SWT.NONE);
		label.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label.setText("你的配置信息为：");
		label.setBounds(47, 56, 170, 17);
		
		Label label_1 = new Label(this, SWT.NONE);
		label_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_1.setText("设备数：");
		label_1.setBounds(70, 79, 48, 17);
		
		Label label_2 = new Label(this, SWT.NONE);
		label_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_2.setText("安装位置数：");
		label_2.setBounds(301, 79, 72, 17);
		
		Composite composite = new Composite(this, SWT.NONE);
		composite.setBackgroundImage(SWTResourceManager.getImage("./images/u556.png"));
		composite.setBounds(10, 175, 720, 362);
		
		Button btnNewButton = new Button(this, SWT.NONE);
		btnNewButton.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
			}
		});
		btnNewButton.setBounds(461, 543, 80, 27);
		btnNewButton.setText("返回");
		
		Button button = new Button(this, SWT.NONE);
		button.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				try {
					TurnFramePic pic=new TurnFramePic();
				} catch (IOException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}
				
			}
		});
		button.setText("具体配置");
		button.setBounds(318, 543, 80, 27);
		
		Label lblNewLabel_1 = new Label(this, SWT.NONE);
		lblNewLabel_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		lblNewLabel_1.setBounds(179, 79, 61, 17);
		lblNewLabel_1.setText("New Label");
		
		Label label_3 = new Label(this, SWT.NONE);
		label_3.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_3.setText("New Label");
		label_3.setBounds(408, 79, 61, 17);
		
		Label lblCpm = new Label(this, SWT.NONE);
		lblCpm.setText("CPM设备类型数：");
		lblCpm.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		lblCpm.setBounds(70, 102, 99, 17);
		
		Label lblRdc = new Label(this, SWT.NONE);
		lblRdc.setText("RDC设备类型数：");
		lblRdc.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		lblRdc.setBounds(301, 102, 97, 17);
		
		Label label_6 = new Label(this, SWT.NONE);
		label_6.setText("子系统个数：");
		label_6.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_6.setBounds(70, 125, 72, 17);
		
		Label label_7 = new Label(this, SWT.NONE);
		label_7.setText("变量数：");
		label_7.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_7.setBounds(301, 125, 72, 17);
		
		Label label_8 = new Label(this, SWT.NONE);
		label_8.setText("目标1：");
		label_8.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_8.setBounds(70, 148, 72, 17);
		
		Label label_9 = new Label(this, SWT.NONE);
		label_9.setText("目标2：");
		label_9.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_9.setBounds(301, 148, 72, 17);
		
		Label label_10 = new Label(this, SWT.NONE);
		label_10.setText("New Label");
		label_10.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_10.setBounds(189, 102, 61, 17);
		
		Label label_11 = new Label(this, SWT.NONE);
		label_11.setText("New Label");
		label_11.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_11.setBounds(188, 125, 61, 17);
		
		Label label_12 = new Label(this, SWT.NONE);
		label_12.setText("New Label");
		label_12.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_12.setBounds(188, 148, 61, 17);
		
		Label label_13 = new Label(this, SWT.NONE);
		label_13.setText("New Label");
		label_13.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_13.setBounds(408, 102, 61, 17);
		
		Label label_14 = new Label(this, SWT.NONE);
		label_14.setText("New Label");
		label_14.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_14.setBounds(408, 125, 61, 17);
		
		Label label_15 = new Label(this, SWT.NONE);
		label_15.setText("New Label");
		label_15.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		label_15.setBounds(408, 148, 61, 17);
		
		Button button_1 = new Button(this, SWT.NONE);
		button_1.addSelectionListener(new SelectionAdapter() {
			@SuppressWarnings("deprecation")
			@Override
			public void widgetSelected(SelectionEvent e) {
				OpenFile ht=new OpenFile();
				ht.show();
				
			}
		});
		button_1.setText("图片操作");
		button_1.setBounds(179, 543, 80, 27);


	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}

}
